package omg.loot;

import java.util.Random;

public class Vohveli extends Entity implements Movable{
   protected Tile[] path;
   protected int step;
   protected Tile start;
   protected Tile tmp;
   Random rami = new Random();
   int index = 0;
   
   public Vohveli(int x, int y, int r){
      super(x,y,r);
      this.step = 0;
   }
   
   public void move(){
      /*
      if(step < path.length){
         x = path[step].x;
         y = path[step].y;
         step++;
      }
      else
         step = 0;
      */
      if(start.parent[0] != null){
         x = start.x;
         y = start.y;
         if(start.parent.length > 1){
            start = start.parent[index];
            if(index == 0)
               index = 1;
            else
               index = 0;
         }else{
            start = start.parent[0];
         }
      }else{
         start = tmp;
      }
      
   }

}
